sysroot: Don't individually fsync dirs in checkout, rely on syncfs
authorColin Walters <walters@verbum.org>
Wed, 13 Jan 2016 15:15:21 +0000 (10:15 -0500)
committerColin Walters <walters@verbum.org>
Wed, 13 Jan 2016 18:15:08 +0000 (13:15 -0500)
commitdc9239dd7b09ef5e104309b4dbf0e136889da274
tree34153803f483ff94241deb17e72a74e7c61f57eb
parent46c3fc5d76653d7e5497c0782ef21a7d422e5f96
sysroot: Don't individually fsync dirs in checkout, rely on syncfs

Originally, a lot of the `fsync()` calls here were added for the
wrong reason - I was chasing a bug that ended up being the extlinux
bootloader not parsing 64 bit ext4 filesystems.  But since it looked
like corruption, I tried adding a lot more `fsync()` calls.

All we should have to do is use `syncfs()`.  If that doesn't work,
it's a kernel bug.

I'm making this change because skipping the individual fsyncs can be a
major performance win - it's easier for the FS to optimize, we do more
in parallel, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=757117
doc/ostree-sections.txt
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/libostree/ostree-sysroot-deploy.c